﻿using AutoMapper;
using MesProjectERP.Host.MesProjectERPDomain;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace MesProjectERP.Host.Controllers
{
    /// <summary>
    /// 物料群组管理
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class MaterialogroupController : ControllerBase
    {
        private readonly MesProjectERPContext _context;
        private readonly IMapper _mapper;

        public MaterialogroupController(MesProjectERPContext context, IMapper mapper)
        {
            this._context = context;
            this._mapper = mapper;
        }
        /// <summary>
        /// 获取物料群组
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public List<Materialgroupmodel> GetMaterialogroup()
        {
            var list = _context.Materialgroupmodels.ToList();
            return list;
        }
    }
}
